/*
 * @description:
 * @version: 1.0.1
 * @Author: xuqiulin
 * @Date: 2021-04-30 11:08:50
 * @LastEditors:
 * @LastEditTime: 2021-04-30 21:29:58
 */
package controllers

import (
	"GameServer/Game/player"

	"github.com/gin-gonic/gin"
)

// 获取玩家所有英雄信息
func GetHerosByUid(c *gin.Context) {
	uid := c.Param("uid")
	heroinfo, ok := player.GetHerosInfoByUid(uid)
	if !ok {
		handleErr(c, "该用户没有英雄")
		return
	}
	mdata := make(map[string]interface{}, 0)
	mdata["uid"] = uid
	mdata["heroinfo"] = heroinfo
	handleOk(c, mdata)
}
